<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>cms系统-首页</title>
    <link rel="stylesheet" href="/libs/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="/css/index.css">
    <!-- 引入js类库 -->
    <script src="/libs/js/jquery.js"></script>
    <script src="/libs/js/axios.js"></script>
    <script src="/libs/js/myaxios.js"></script>
    <script src="/libs/js/art-template.js"></script>
    <script src="/libs/layui/layui.js">
    </script>
    <!-- 引入自己的js -->
    <script src="/js/index.js"></script>
</head>

<body>
    <div class="header"></div>
    <script>
        // 载入头部的新闻分类和登录模块
        $('.header').load('/common_header.html')
    </script>
    <div id="main1">
        <div class="title">
            <h3>图片新闻</h3><a href="#">更多&gt;&gt;</a>
        </div>
        <ul>
            <script type="text/html" id="picTpl">
                {{ each pics v}}
                <li>
                    <a href="/news_content.html?id={{v.id}}"><img src="{{v.picture}}" height="178" width="150" /></a>
                    <p><a href="/news_content.html?id={{v.id}}">{{v.title|substr}}</a></p>
                </li>
                {{/each}}
            </script>
        </ul>
    </div>

    <div class="blank20"></div>

    <div class="news newArticles">
        <script type="text/html" id="newArticlesTpl">
            <div class="title">
                <h3>最新新闻</h3><a href="#">更多&gt;&gt;</a>
            </div>
            <ul>
                {{ each newArticles v index}}
                <li><span>{{v.add_time}}</span> <a href="/news_content.html?id={{v.id}}">{{v.title}}</a></li>
                {{ if (index+1)%5===0}}
            </ul>
            <ul>{{/if}} {{/each}}
            </ul>
        </script>
    </div>

    <div class="blank20"></div>

    <div class="news hotArticles">
        <script type="text/html" id="hotArticlesTpl">
            <div class="title">
                <h3>最热新闻</h3><a href="#">更多&gt;&gt;</a>
            </div>
            <ul>
                {{ each hotArticles v index}}
                <li><span>{{v.add_time}}</span> <a href="/news_content.html?id={{v.id}}">{{v.title}}</a></li>
                {{ if (index+1)%5===0}}
            </ul>
            <ul>{{/if}} {{/each}}
            </ul>
        </script>
    </div>

    <div class="blank20"></div>

    <div id="footer"> </div>
    <script>
        // 载入公共的底部
        $('#footer').load('common_footer.html')
    </script>
</body>

</html>

</html>